<?php

require_once(sfConfig::get('sf_lib_dir').'/filter/base/BaseFormFilterPropel.class.php');

/**
 * Site filter form base class.
 *
 * @package    alika
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormFilterGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseSiteFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'name'                    => new sfWidgetFormFilterInput(),
      'proj_path'               => new sfWidgetFormFilterInput(),
      'main_domain'             => new sfWidgetFormFilterInput(),
      'ftp_host'                => new sfWidgetFormFilterInput(),
      'ftp_dir'                 => new sfWidgetFormFilterInput(),
      'ftp_user'                => new sfWidgetFormFilterInput(),
      'ftp_password'            => new sfWidgetFormFilterInput(),
      'photo_path'              => new sfWidgetFormFilterInput(),
      'main_page_text'          => new sfWidgetFormFilterInput(),
      'service_page_text'       => new sfWidgetFormFilterInput(),
      'created_at'              => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => true)),
      'updated_at'              => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => true)),
      'domain'                  => new sfWidgetFormFilterInput(),
      'url'                     => new sfWidgetFormFilterInput(),
      'slogan'                  => new sfWidgetFormFilterInput(),
      'email_contact'           => new sfWidgetFormFilterInput(),
      'text_contact'            => new sfWidgetFormFilterInput(),
      'text_after_send_contact' => new sfWidgetFormFilterInput(),
      'menu_mainpage'           => new sfWidgetFormFilterInput(),
      'menu_service'            => new sfWidgetFormFilterInput(),
      'menu_articles'           => new sfWidgetFormFilterInput(),
      'menu_contact'            => new sfWidgetFormFilterInput(),
      'seo_title'               => new sfWidgetFormFilterInput(),
      'seo_description'         => new sfWidgetFormFilterInput(),
      'seo_keywords'            => new sfWidgetFormFilterInput(),
      'seo_code_counter'        => new sfWidgetFormFilterInput(),
      'fl_new'                  => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'slogan1'                 => new sfWidgetFormFilterInput(),
      'slogan2'                 => new sfWidgetFormFilterInput(),
      'description'             => new sfWidgetFormFilterInput(),
      'destrib'                 => new sfWidgetFormFilterInput(),
      'folder_id'               => new sfWidgetFormPropelChoice(array('model' => 'Folder', 'add_empty' => true)),
      'items_per_page'          => new sfWidgetFormFilterInput(),
      'mail_hostname'           => new sfWidgetFormFilterInput(),
      'mail_port'               => new sfWidgetFormFilterInput(),
      'mail_username'           => new sfWidgetFormFilterInput(),
      'mail_password'           => new sfWidgetFormFilterInput(),
      'mail_sender_address'     => new sfWidgetFormFilterInput(),
      'mail_sender_name'        => new sfWidgetFormFilterInput(),
      'mail_title'              => new sfWidgetFormFilterInput(),
      'distrib_id'              => new sfWidgetFormPropelChoice(array('model' => 'Distrib', 'add_empty' => true)),
      'cache_time'              => new sfWidgetFormFilterInput(),
      'owner_id'                => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'name'                    => new sfValidatorPass(array('required' => false)),
      'proj_path'               => new sfValidatorPass(array('required' => false)),
      'main_domain'             => new sfValidatorPass(array('required' => false)),
      'ftp_host'                => new sfValidatorPass(array('required' => false)),
      'ftp_dir'                 => new sfValidatorPass(array('required' => false)),
      'ftp_user'                => new sfValidatorPass(array('required' => false)),
      'ftp_password'            => new sfValidatorPass(array('required' => false)),
      'photo_path'              => new sfValidatorPass(array('required' => false)),
      'main_page_text'          => new sfValidatorPass(array('required' => false)),
      'service_page_text'       => new sfValidatorPass(array('required' => false)),
      'created_at'              => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
      'updated_at'              => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
      'domain'                  => new sfValidatorPass(array('required' => false)),
      'url'                     => new sfValidatorPass(array('required' => false)),
      'slogan'                  => new sfValidatorPass(array('required' => false)),
      'email_contact'           => new sfValidatorPass(array('required' => false)),
      'text_contact'            => new sfValidatorPass(array('required' => false)),
      'text_after_send_contact' => new sfValidatorPass(array('required' => false)),
      'menu_mainpage'           => new sfValidatorPass(array('required' => false)),
      'menu_service'            => new sfValidatorPass(array('required' => false)),
      'menu_articles'           => new sfValidatorPass(array('required' => false)),
      'menu_contact'            => new sfValidatorPass(array('required' => false)),
      'seo_title'               => new sfValidatorPass(array('required' => false)),
      'seo_description'         => new sfValidatorPass(array('required' => false)),
      'seo_keywords'            => new sfValidatorPass(array('required' => false)),
      'seo_code_counter'        => new sfValidatorPass(array('required' => false)),
      'fl_new'                  => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'slogan1'                 => new sfValidatorPass(array('required' => false)),
      'slogan2'                 => new sfValidatorPass(array('required' => false)),
      'description'             => new sfValidatorPass(array('required' => false)),
      'destrib'                 => new sfValidatorPass(array('required' => false)),
      'folder_id'               => new sfValidatorPropelChoice(array('required' => false, 'model' => 'Folder', 'column' => 'id')),
      'items_per_page'          => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'mail_hostname'           => new sfValidatorPass(array('required' => false)),
      'mail_port'               => new sfValidatorPass(array('required' => false)),
      'mail_username'           => new sfValidatorPass(array('required' => false)),
      'mail_password'           => new sfValidatorPass(array('required' => false)),
      'mail_sender_address'     => new sfValidatorPass(array('required' => false)),
      'mail_sender_name'        => new sfValidatorPass(array('required' => false)),
      'mail_title'              => new sfValidatorPass(array('required' => false)),
      'distrib_id'              => new sfValidatorPropelChoice(array('required' => false, 'model' => 'Distrib', 'column' => 'id')),
      'cache_time'              => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'owner_id'                => new sfValidatorPropelChoice(array('required' => false, 'model' => 'sfGuardUser', 'column' => 'id')),
    ));

    $this->widgetSchema->setNameFormat('site_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Site';
  }

  public function getFields()
  {
    return array(
      'id'                      => 'Number',
      'name'                    => 'Text',
      'proj_path'               => 'Text',
      'main_domain'             => 'Text',
      'ftp_host'                => 'Text',
      'ftp_dir'                 => 'Text',
      'ftp_user'                => 'Text',
      'ftp_password'            => 'Text',
      'photo_path'              => 'Text',
      'main_page_text'          => 'Text',
      'service_page_text'       => 'Text',
      'created_at'              => 'Date',
      'updated_at'              => 'Date',
      'domain'                  => 'Text',
      'url'                     => 'Text',
      'slogan'                  => 'Text',
      'email_contact'           => 'Text',
      'text_contact'            => 'Text',
      'text_after_send_contact' => 'Text',
      'menu_mainpage'           => 'Text',
      'menu_service'            => 'Text',
      'menu_articles'           => 'Text',
      'menu_contact'            => 'Text',
      'seo_title'               => 'Text',
      'seo_description'         => 'Text',
      'seo_keywords'            => 'Text',
      'seo_code_counter'        => 'Text',
      'fl_new'                  => 'Boolean',
      'slogan1'                 => 'Text',
      'slogan2'                 => 'Text',
      'description'             => 'Text',
      'destrib'                 => 'Text',
      'folder_id'               => 'ForeignKey',
      'items_per_page'          => 'Number',
      'mail_hostname'           => 'Text',
      'mail_port'               => 'Text',
      'mail_username'           => 'Text',
      'mail_password'           => 'Text',
      'mail_sender_address'     => 'Text',
      'mail_sender_name'        => 'Text',
      'mail_title'              => 'Text',
      'distrib_id'              => 'ForeignKey',
      'cache_time'              => 'Number',
      'owner_id'                => 'ForeignKey',
    );
  }
}
